#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

// 前向声明
namespace Ui {
class Widget;
}
class ImagePlayerThread;
class UdpListenerThread;

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void downloadFileFromOSS();
    void handleCommand(const QString& command);

private:
    Ui::Widget *ui;

    // UI组件
    class QPushButton *oss_download;
    class QLabel *pic_show;
    class QLabel *statusLabel;
    class QLabel *commandLabel;

    // 线程对象
    ImagePlayerThread *imagePlayer;
    UdpListenerThread *udpListener;
    QStringList localImagePaths;

    void showFirstImage();
    void sendStatusResponse();
};

#endif // WIDGET_H
